% ------------------------------------------------------------------------ 
% Read me File for national Results in
% Ben-David, Itzhak, Sebastian Weber, and Pascal Towbin 
% "Inferring Expectations from Observables: Evidence from the Housing Market" 
% Review of Economics and Statistics
% ------------------------------------------------------------------------ 

A. Files used for State Level Results

Replication files for the State-level results include:

- MAIN_FILE_NATIONAL:  		% Main file to reproduce results and calls on subfiles

- estimation_identification:         	% Subroutine: Estimates SVAR and imposes Sign Restrictions 
- parametersdate			% Subroutine: file to adjust some estimation parameters (e.g. numbers of accepted draws)
- load_data; 			        % Subroutine: load data
- define_vars                           % Subroutine: transforms some variables for the VAR
- irf_figure                            % Subroutine: Figure showing impulse response functions (Figure 2)
- histdecomp_figure;                 	% Subroutine: Figure showing historical decomposition (Figure 3)
- histdecomp_figure_percentiles;        % Subroutine: Distribution of historical decomposition (Figure 4 and Table 2)


The code draws also on standard procedures in Matlab and codes by other authors for standard estimation procedures that are not mentioned here, but are contained in the "auxilliary" subfolder. 


B. Data

ΔP: The change in the real house price is measured by the log difference of the national real Case-Shiller house price index.
ΔS: The change in the supply of housing is measured as the log of new private housing permits from the U.S. Census Bureau
I: The real mortgage rate ($I$) is approximated by the nominal contract rate on the purchases of existing single-family homes (provided by the Federal Housing Financing Agency (FHFA)) 
 less the long-term inflation expectations, measured by the 10-year-ahead forecast of the inflation rate (Macroeconomic Advisers, downloaded from Haver Analytics (www.haver.com).
R-P: The log of the rent-to-price ratio is computed as the log difference between the housing component of the Consumer Price Index (Bureau of Labor Statistics) and the nominal Case-Shiller house price index. 
ΔHH: net household formation from the U.S. Census Bureau (in thousands, break-adjusted by Haver Analytics), divided by the number of households in the previous quarter, as a measure of the demand for housing consumption ($ \Delta HH_{t}$). Finally, the log difference of U.S. real GDP ($\Delta RGDP$), which we use as a control for economic activity, is taken from the Bureau of Economic Analysis.
ΔRDGP: the log difference of U.S. real GDP (Bureau of Economic Analysis).
V: overall ratio of vacant houses that are part of the market relative to the total housing stock, excluding seasonal factors (U.S. Census Bureau)

C. Software and Version

Matlab, version R2020b





